<?php


namespace Xiaoguai\DesignPattern\DP002\Factory\Factory;


use Xiaoguai\DesignPattern\DP002\Factory\FactoryInterface;
use Xiaoguai\DesignPattern\DP002\Product\Computer\NoteBook;
use Xiaoguai\DesignPattern\DP002\Product\ComputerInterface;
use Xiaoguai\DesignPattern\DP002\Product\Phone\MobilePhone;
use Xiaoguai\DesignPattern\DP002\Product\PhoneInterface;

class XiaomiFactory implements FactoryInterface
{

    public function createComputer(): ComputerInterface
    {
        return new NoteBook();
    }

    public function createPhone(): PhoneInterface
    {
        return new MobilePhone();
    }
}